Skip to content

✨ feat(result-tabs): 支持固定结果标签及批量关闭操作 - #6954

Merged
t8y2 merged 3 commits into
t8y2:mainfrom
eryajf:issue_6058
Aug 22, 2026
Merged

✨ feat(result-tabs): 支持固定结果标签及批量关闭操作#6954
t8y2 merged 3 commits into
t8y2:mainfrom
eryajf:issue_6058

Conversation

@eryajf

@eryajf eryajf commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

变更说明

  • 支持单独固定/取消固定结果标签,以及一键取消固定全部结果标签。
  • 为结果标签右键菜单增加关闭其他、关闭左侧和关闭右侧操作,并避免右键时选中文本。
  • 查询会保留单独固定的结果;优先复用未固定结果标签,无可复用标签时创建新标签。
  • 修复结果缓存恢复、批量关闭和固定/取消固定过程中的状态一致性问题。
  • 优化新增结果标签时的横向滚动:追加 Run 不再抖动;复用隐藏 Run 时仍确保活动标签可见。

变更类型

  • 新功能
  • Bug 修复
  • 性能优化
  • 代码重构
  • 文档更新
  • CI / 构建

涉及前端

  • 本 PR 涉及前端改动,已附截图/录屏(见下方)
image

修复查询结果列表抖动问题。

原来:

20BEE89A-59AD-4F80-B918-E1899E74E3F7

现在:

268A1F82-B2E2-4B09-A1BE-48998473F4AD

验证

  • make check 通过
  • make cargo-check-fast 通过
  • 相关测试通过

已执行:

  • pnpm exec vitest run packages/app-tests/queryResultToolbar.test.ts packages/app-tests/queryStore.test.ts packages/app-tests/tabPresentation.test.ts
    • 219 项通过
  • pnpm typecheck
    • 通过
  • pnpm lint
    • 通过
  • git diff --check
    • 通过

关联 Issue

Close #6058

- 为结果标签和下拉选择器增加右键菜单,可固定、取消固定、关闭其他及关闭左右侧标签
- 固定结果在普通查询执行时不会被覆盖,必要时自动复用未固定标签或创建新标签
- 持久化固定状态,并完善结果快照恢复与淘汰场景处理
- 优化新增结果标签时的滚动位置,避免打断用户横向浏览
- 补充多语言文案与持久化测试
@github-actions github-actions Bot added area/desktop Desktop application or Tauri shell enhancement New feature or request ui-change Changes user-visible interface, text, or visual assets labels Aug 22, 2026

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes。

  1. :exact-head frontend CI 在 失败。执行新查询期间重新选择保留的结果后, 变成 ,测试期望 。请修复结果运行切换与 batch execution 状态投影之间的生命周期/状态保存问题。

  2. 当前 frontend CI 为 1 项失败(10813 项通过),请修复后重新运行完整 frontend check。

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes。

  1. apps/desktop/src/stores/queryStore.ts:exact-head frontend CI 在 apps/desktop/src/stores/__tests__/queryStore.multiStatementError.spec.ts 失败。执行新查询期间重新选择保留的结果后,batchSqlExecution.submittedSql 变成 undefined,测试期望 SELECT 1 AS value。请修复结果运行切换与 batch execution 状态投影之间的生命周期/状态保存问题。

  2. 当前 frontend CI 为 1 项失败(10813 项通过),请修复后重新运行完整 frontend check。

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer patch pushed in 616a92c.

  • Root cause: restoring a disk-backed result snapshot overlaid cleared in-memory payload fields, which erased batchSqlExecution state when selecting a retained result during a new query.
  • Patch: overlay only the in-memory tab metadata and preserve the snapshot payload and execution state.
  • Validation: queryStore.multiStatementError.spec.ts, packages/app-tests/queryStore.test.ts, packages/app-tests/openTabsPersistence.test.ts, pnpm typecheck, and git diff --check all passed.

@t8y2
t8y2 merged commit 93dc455 into t8y2:main Aug 22, 2026
15 checks passed
@t8y2

t8y2 commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution! Merged in 93dc455, will be released in the next version.

@eryajf
eryajf deleted the issue_6058 branch August 23, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/desktop Desktop application or Tauri shell enhancement New feature or request ui-change Changes user-visible interface, text, or visual assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 期望增加关闭other result tabs功能 + unpin 指定result tab的功能

2 participants